<?php
class core_1 extends Update_Model_Database_AbstractChange{


	protected $comment="Создание таблицы core";

	public function up(){
		$sql=
			'CREATE TABLE IF NOT EXISTS core(
  				id INT(11) NOT NULL AUTO_INCREMENT,
  				create_by INT(11) DEFAULT NULL,
  				create_date DATETIME NOT NULL,
  				update_by INT(11) DEFAULT NULL,
  				update_date DATETIME NOT NULL,
  				`table` TEXT DEFAULT NULL,
  				PRIMARY KEY (id)
			)
				ENGINE = INNODB
				CHARACTER SET utf8
				COLLATE utf8_general_ci;';
		$this->db->query($sql);

	}

	public function down(){
		$sql='DROP TABLE IF EXISTS core ;';
		$this->db->query($sql);
	}

}